package com.openvid.webrtc.openvid.cmd.publish_video;

import com.openvid.webrtc.openvid.cmd.AbsRequestCmd;

/**
 * @author jinyf
 */
public class CmdPublishVideo extends AbsRequestCmd<RespPublishVideo> {

    private final ParamsPublishVideo mParams = new ParamsPublishVideo();

    private String mDescription;

    @Override
    protected String getMethodName() {
        return "publishVideo";
    }

    public void setParams(String description) {
        mDescription = description;
    }

    @Override
    protected Object getParams() {
        mParams.audioActive ="true";
        mParams.videoActive ="true";
        mParams.doLoopback ="false";
        mParams.frameRate ="30";
        mParams.hasAudio ="true";
        mParams.hasVideo ="true";
        mParams.typeOfVideo ="CAMERA";
        mParams.videoDimensions ="{\"width\":1920, \"height\":1080}";
        mParams.sdpOffer =mDescription;
        return mParams;
    }

    @Override
    protected Class<RespPublishVideo> getResponseClass() {
        return RespPublishVideo.class;
    }
}
